

float4x4 gWVP;
struct VS_OUTPUT
{
    float4 oPosH : POSITION0 ;
    float3 oEnvTex : TEXCOORD0;
};

VS_OUTPUT SkyVS(in float3 posL : POSITION0)
{
VS_OUTPUT Output;

	// Set z = w so that z/w = 1 (i.e., skydome always on far plane).
   Output.oPosH = mul(float4(posL, 1.0f), gWVP).xyww; 
    
    // Use skymesh vertex position, in local space, as index into cubemap. 
    Output.oEnvTex = posL;

return Output;

	
}


